package app.routing;

import app.domain.geojson.GeoLineStringDTO;

import java.util.Collections;
import java.util.List;

class PathQueryResponse implements RoutingController.Response {
    private int code;
    private String msg;
    /** SRID: Spatial Reference System Identifier */
    private int srid;
    private List<GeoLineStringDTO> geometryList;

    public int getSrid() {
        return srid;
    }

    public void setSrid(int srid) {
        this.srid = srid;
    }

    public List<GeoLineStringDTO> getGeometryList() {
        return geometryList;
    }

    public void setGeometryList(List<GeoLineStringDTO> geometryList) {
        this.geometryList = geometryList;
    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public void setCode(int code) {
        this.code = code;
    }

    @Override
    public String getMsg() {
        return msg;
    }

    @Override
    public void setMsg(String msg) {
        this.msg = msg;
    }

    public PathQueryResponse(int code, String msg, int srid, List<GeoLineStringDTO> geometryList) {
        this.code = code;
        this.msg = msg;
        this.srid = srid;
        this.geometryList = geometryList;
    }

    public PathQueryResponse(int code, String msg) {
        this.code = code;
        this.msg = msg;
        srid = 0;
        geometryList = Collections.emptyList();
    }
}
